The previous chapter explains how the Display Manager automatically repositions windows if necessary to ensure that windows are accessible when the user changes the display environment. If the Display Manager moves windows in a manner inappropriate for your application, your application should reposition them instead. Applications that use only the standard window definition functions provided by the Window Manager generally do not need to use the Display Manager.
However, you may need or want your application to perform its own window positioning under various circumstances, such as when
When necessary, the Display Manager automatically repositions windows of type
dBoxProc
(that is, alert boxes and modal dialog boxes) so that the lower-left corners of the windows appear onscreen. This gives users access to the area with the OK and Cancel buttons.
In addition, your application should respond to Display Manager changes if your application relies on display information that it stores internally. For example, if your application caches display positions,
GDevice
structures for displays other than the main screen, or the value in the
screenBits.bounds
field of the
screenBits
global variable, this information may become invalid after the user changes the display configuration. Therefore, your application should update its internal values accordingly after a display configuration change.
To determine whether the Display Manager is available, use the
Gestalt
function with the
gestaltDisplayMgrAttr
selector. Test the bit field indicated by the
gestaltDisplayMgrPresent
constant in the
response
parameter. If the bit is set, then the Display Manager is present.
Presence of the Display Manager does not guarantee that a computer also supports video mirroring. To determine whether QuickDraw supports video mirroring on the user's computer system, use the
DMQDIsMirroringCapable
function.